package app.common.dao;
import java.util.ArrayList;
import java.util.List;

import cn.lily.com.container.data.Record;
import cn.lily.com.exception.YaconException;
import cn.lily.esb.framework.drivers.db.bean.ControlDAO;
public class Leo_can_any_relaBean extends ControlDAO implements Cloneable {
	private static final long serialVersionUID = 1L;
	public Leo_can_any_relaBean() throws YaconException {
		super();
		setTableName("LEO_CAN_ANY_RELA");
	}
	String  fcan_is_novel;
	String  fcan_id;
	String  fcan_is_music;
	String  fcan_is_game;
	String  fcan_is_commic;

	public void setCan_is_novel( String can_is_novel)throws YaconException{
		setFieldData("can_is_novel",can_is_novel,TEXT);
		this.fcan_is_novel=can_is_novel;
	}

	public String getCan_is_novel(){
		if ( this.fcan_is_novel == null){
			return "";
		}
		else {
			return this.fcan_is_novel;
		}
	}

	public void setCan_id( String can_id)throws YaconException{
		setFieldData("can_id",can_id,TEXT);
		this.fcan_id=can_id;
	}

	public String getCan_id(){
		if ( this.fcan_id == null){
			return "";
		}
		else {
			return this.fcan_id;
		}
	}

	public void setCan_is_music( String can_is_music)throws YaconException{
		setFieldData("can_is_music",can_is_music,TEXT);
		this.fcan_is_music=can_is_music;
	}

	public String getCan_is_music(){
		if ( this.fcan_is_music == null){
			return "";
		}
		else {
			return this.fcan_is_music;
		}
	}

	public void setCan_is_game( String can_is_game)throws YaconException{
		setFieldData("can_is_game",can_is_game,TEXT);
		this.fcan_is_game=can_is_game;
	}

	public String getCan_is_game(){
		if ( this.fcan_is_game == null){
			return "";
		}
		else {
			return this.fcan_is_game;
		}
	}

	public void setCan_is_commic( String can_is_commic)throws YaconException{
		setFieldData("can_is_commic",can_is_commic,TEXT);
		this.fcan_is_commic=can_is_commic;
	}

	public String getCan_is_commic(){
		if ( this.fcan_is_commic == null){
			return "";
		}
		else {
			return this.fcan_is_commic;
		}
	}

	public  List<Leo_can_any_relaBean> findListBeans(String sSqlWhere)throws YaconException {
		List<Leo_can_any_relaBean> listBeans = new ArrayList<Leo_can_any_relaBean>();
		findTable = findTableByWhere(sSqlWhere);
		while (findTable.next())
		{
			Leo_can_any_relaBean fDaoBean  = new Leo_can_any_relaBean();
			fDaoBean.fcan_is_novel = findTable.getString("can_is_novel");
			fDaoBean.fcan_id = findTable.getString("can_id");
			fDaoBean.fcan_is_music = findTable.getString("can_is_music");
			fDaoBean.fcan_is_game = findTable.getString("can_is_game");
			fDaoBean.fcan_is_commic = findTable.getString("can_is_commic");
			fDaoBean.operate_mode = "edit";
			listBeans.add(fDaoBean);
		}
		return listBeans;
	}

	public Leo_can_any_relaBean findBean(String sSqlWhere)throws YaconException {
		findTable = findTableByWhere(sSqlWhere);
		if (findTable.next())
		{
			Leo_can_any_relaBean fDaoBean  = new Leo_can_any_relaBean();
			fDaoBean.fcan_is_novel = findTable.getString("can_is_novel");
			fDaoBean.fcan_id = findTable.getString("can_id");
			fDaoBean.fcan_is_music = findTable.getString("can_is_music");
			fDaoBean.fcan_is_game = findTable.getString("can_is_game");
			fDaoBean.fcan_is_commic = findTable.getString("can_is_commic");
			fDaoBean.operate_mode = "edit";
			return fDaoBean;
		}else
			return null;
	}

	public void setViewRecord(Record viewRecord) throws YaconException{
		if (viewRecord.getString("can_is_novel") != null)
			setCan_is_novel(viewRecord.getString("can_is_novel"));
		if (viewRecord.getString("can_id") != null)
			setCan_id(viewRecord.getString("can_id"));
		if (viewRecord.getString("can_is_music") != null)
			setCan_is_music(viewRecord.getString("can_is_music"));
		if (viewRecord.getString("can_is_game") != null)
			setCan_is_game(viewRecord.getString("can_is_game"));
		if (viewRecord.getString("can_is_commic") != null)
			setCan_is_commic(viewRecord.getString("can_is_commic"));
	}

}
